
/* Total Constants */
#define kMaxFrameWidth      1024
#define kMaxFrameHeight     748

/* EProcessBar */
#define kTimerInterval      1 / 60.0f
#define kColorFrameWidth    15.0f

/* Colors */
#define kCommonWhiteStartColor      [UIColor colorWithRed:252 / 255.0f green:252 / 255.0f blue:252 / 255.0f alpha:1.0f]
#define kCommonWhiteEndColor        [UIColor colorWithRed:222 / 255.0f green:222 / 255.0f blue:208 / 255.0f alpha:1.0f]
#define kCommonGreenStartColor      [UIColor colorWithRed:134 / 255.0f green:228 / 255.0f blue:0.0f alpha:1.0f]
#define kCommonGreenEndColor        [UIColor colorWithRed:73 / 255.0f green:138 / 255.0f blue:0.0f alpha:1.0f]

#define kEProcessBarFirstColor      [UIColor colorWithRed:31 / 255.0f green:150 / 255.0f blue:255 / 255.0f alpha:1.0f]
#define kEProcessBarSecondColor     [UIColor colorWithRed:234 / 255.0f green:234 / 255.0f blue:234 / 255.0f alpha:1.0f]

/* Soap namespace */
#define kSoapNameSpace      @"http://meal.ekise.com"

static inline NSString * getSoapURL() {

    NSUserDefaults *userDefault = [NSUserDefaults standardUserDefaults];
    NSString *url = [userDefault stringForKey:@"ServerURL"];
    if(url != nil && url.length > 0) {
    
        return url;
    }
    
    return @"";
}

static inline void alertInfo(NSString *info) {

    UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"提示" message:info delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil];
    [alertView show];
    [alertView release];
}
